<div th:fragment="control_condition_button_back">
    <script type="text/javascript">
        /** 时间控件元数据 */
        function metadata_button_back(params) {
            params = $.extend({}, {
                OPTION: {
                    TEXT: "返回"
                }
            }, params);
            return $.extend(new metadata_base(params), this);
        }

        /** 时间控件 元数据视图 面板视图 */
        function metadata_view_button_back(control) {
            this.OPTION = function (control) {
                var option = this.control.getMetadata("OPTION");
                var view = $($("#BUTTON_BACK_OPTION").html());
                var _this = this;
                view.find("input[name]").each(function () {
                    var name = $(this).attr("name");
                    $(this).val(option[name]);
                    $(this).on("keyup", function () {
                        var value = $(this).val();
                        var name = $(this).attr("name");
                        option[name] = value;
                        _this.linkageMetadata("OPTION", option);
                    });
                });
                $(this.settingPanel).append(view);
            }
            return $.extend(new metadata_view_base(control), this);
        }

        /** 时间控件 表单视图 */
        function metadata_form_view_button_back(control) {
            var _this = this;
            this.control = control;
            this.OPTION = function (value) {
                _this.control.find("a").html(value.TEXT);
            }
            return $.extend(new metadata_form_view_base(control), this);

        }
    </script>
    <script type="text/html" id="BUTTON_BACK_OPTION">
        <div class="form-setting-group">
            名称：<input class="form-control" name="TEXT">
        </div>
    </script>

</div>
